package cn.day.ssmtest.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.day.ssmtest.bean.TestBean;

@Controller
public class TestController {
  
	@RequestMapping("springTest")
	public String returnStr() {
		return "/index";
	}
	
	@RequestMapping("entityTest")
    @ResponseBody
    public TestBean returnEntify() {
        TestBean testBean = new TestBean();
        testBean.setTeststr("测试实体");
        testBean.setTestint(12);
        return testBean;
    }
	
}
